﻿using FluentValidation;
using Nop.Admin.Models.XJ;
using Nop.Core.Domain.XJ;
using Nop.Data;
using Nop.Web.Framework.Validators;

namespace Nop.Admin.Validators.XJ
{
	public partial class EquipmentStockLogValidator : BaseNopValidator<EquipmentStockLogModel>
	{
		public EquipmentStockLogValidator(IDbContext dbContext)
		{
			RuleFor(x => x.Amount).GreaterThan(0).WithMessage("数量必须大于0");

			SetDatabaseValidationRules<XJEquipmentStockLog>(dbContext);
		}
	}
}